package com.qr.rabbitmq.listener;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;

public class SpringQueueListener implements MessageListener {

    /**
     * 回调方法
     * @param message
     */
    @Override
    public void onMessage(Message message) {
        //得到消息
        byte[] body = message.getBody();
        System.out.println(new String(body));
    }
}
